package com.jinjiafeng.baselibrary.http;

import android.content.Context;

import java.util.WeakHashMap;

/**
 * date:on 18-4-23
 * @author jinjiafeng
 */

public interface IHttpEngine {

    void get(boolean cache,Context context,String url, WeakHashMap<String, Object> params,
             ICallback success);

    void post(boolean cache,Context context,String url, WeakHashMap<String, Object> params,
              ICallback success);

    ICallback DEFAULT_CALLBACK = new ICallback() {
        @Override
        public void onSuccess(String result) {

        }

        @Override
        public void onPreExecute(WeakHashMap<String, Object> params) {

        }

        @Override
        public void onError(Exception e) {

        }
    };
}
